//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2007 CORE Solutions Limited
// All rights reserved.
// PROPRIETARY AND CONFIDENTIAL INFORMATION.
// Use is subject to license terms.
//
// FUNCTION ID      :   FACT
// AUTHOR           :   William Xu 
// DATE CREATE      :   2007/08/01
// DESCRIPTION      :   a COMMON DELEGATE file for the function, FACT
//                  :   
//                  :   
//                  :   
//
// MODIFICATION HISTORY:
// DATE         AUTHOR          VERSION NO.         COMMENT
// -----------  --------------  ------------------  -------------------
// 2007/08/01   William Xu      1.0                 source is generated.
//
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

package com.erp.app.common.attachment.delegate;

import java.sql.Connection;

import com.erp.app.common.attachment.bizlogic.AttachmentBaseCommonUtil;
import com.erp.framework.model.dao.ServiceLocator;
import com.erp.framework.util.logger.Logger;

/**
* <p>A <strong>Delegate</strong> provides the logical flow and control
* of the business model.
*
* @author          William Xu 
* @version 1.0     2007/08/01
* @since           FrameWork 1.1
*
*/
public class AttachmentBaseCommonDelegate {

	private AttachmentBaseCommonUtil util = new AttachmentBaseCommonUtil();

	public String generateAttachLineNo(String companyCode, String userCode){
		Connection conn = null;
		String ret = "";

		try {
			ServiceLocator srvLocator = ServiceLocator.getInstance();
			conn = srvLocator.getDSDBConnection();
			ret = util.generateAttachLineNo(companyCode, userCode, conn);
		} catch (Exception e) {
			Logger.logExceptions(this, e);
		} finally {
			try {
				conn.close();
			} catch (Exception e) {
				Logger.logExceptions(this, e);
			}
		}
		return ret;
	}


}
